<?php if (!defined('HKCMS_VERSION')) exit(); ?>
{hkcms:admintemplate file="common/Head"}
<style>
    #frm-add table tr td {
        padding: 10px;
    }
    #license-tags {
        display: none;
    }
</style>
<body>
<div class="wrap">
  <div id="home_toptip"></div>
  <h2 class="h_a">系统信息</h2>
  <div class="home_info">
    <ul>
      {volist name="server_info" id="vo"}
        <li> <em>{$key}</em> <span>{$vo}</span> </li>
      {/volist}
    </ul>
  </div>
  <h2 class="h_a">开发团队</h2>
  <div class="home_info" id="home_devteam">
      <ul>
      <li> <em>版权所有：</em> <span><a href="http://www.hkcms.cn" target="_blank">广州恒企教育科技有限公司</a></span> </li>
      <li> <em>研发团队：</em> <span><a href="http://bbs.hkcms.cn/user-thread-1.htm" target="_blank">HkCms</a>、<a href="http://bbs.hkcms.cn/user-thread-2.htm" target="_blank">lonely</a>、<a href="http://bbs.hkcms.cn/user-thread-3.htm" target="_blank">HoLuo</a>、<a href="http://bbs.hkcms.cn/user-thread-10.htm" target="_blank">Hoo</a></span> </li>
      <li> <em>联系邮箱：</em> <span>admin@hkcms.cn</span> </li>
      <li> <em>官方Q群：</em> <span>808251031 (HkCms交流②群)<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=7a8f0301782f8cf2436718627cf8c9ceca5e2b9ebb74bbb90446530c928a016f"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="HkCms交流②群" title="HkCms交流②群"></a></span> </li>
      <li> <em><font color="#0000FF">官方网站：</font></em> <span><a href="http://www.hkcms.cn/" target="_blank">http://www.hkcms.cn/</a></span> </li>
      <li> <em><font color="#0000FF">社区论坛：</font></em> <span><a href="http://bbs.hkcms.cn/" target="_blank">http://bbs.hkcms.cn/</a></span> </li>
      <li> <em><font color="#0000FF">在线使用手册</font></em> <span><a href="http://doc.hkcms.cn/" target="_blank">http://doc.hkcms.cn/</a></span> </li>
    </ul>
  </div>
  <h2 class="h_a" style="display:none">问题反馈</h2>
  
  <div class="" style="display:none">
      <div class="btn_wrap_pd">             
        <button class="btn btn_submit mr10" type="submit">提交</button>
      </div>
  </div>
  </form>
</div>
<script src="{$config_siteurl}statics/js/common.js"></script> 
<script src="{$config_siteurl}statics/js/artDialog/artDialog.js"></script> 
<script>
$("#btn_submit").click(function(){
	$("#tips_success").fadeTo(500,1);
});
artDialog.notice = function (options) {
    var opt = options || {},
        api, aConfig, hide, wrap, top,
        duration = 800;
        
    var config = {
        id: 'Notice',
        left: '100%',
        top: '100%',
        fixed: true,
        drag: false,
        resize: false,
        follow: null,
        lock: false,
        init: function(here){
            api = this;
            aConfig = api.config;
            wrap = api.DOM.wrap;
            top = parseInt(wrap[0].style.top);
            hide = top + wrap[0].offsetHeight;
            
            wrap.css('top', hide + 'px')
                .animate({top: top + 'px'}, duration, function () {
                    opt.init && opt.init.call(api, here);
                });
        },
        close: function(here){
            wrap.animate({top: hide + 'px'}, duration, function () {
                opt.close && opt.close.call(this, here);
                aConfig.close = $.noop;
                api.close();
            });
            
            return false;
        }
    };	
    
    for (var i in opt) {
        if (config[i] === undefined) config[i] = opt[i];
    };
    
    return artDialog(config);
};
$(function(){
	$.getJSON('{:url("public_server")}',function(data){
		if(data.state != 'fail'){
			return false;
		}
		if(data.latestversion.status) {
			art.dialog({
				title:'升级提示',
				 icon: 'warning',
				content: '系统检测到新版本发布，请尽快更新到 '+data.latestversion.version.version + '，以确保网站安全！',
				cancelVal: '关闭',
				cancel: true
			});
		}
		if(data.license.authorize){
			$('#server_license').html(data.license.name);
		}else{
			$('#server_license').html('非授权用户');
		}
		$('#server_version').html(data.latestversion.version.version);
		$('#server_build').html(data.latestversion.version.build);
		
		if(data.notice.id > 0){
			art.dialog.notice({
				title: data.notice.title,
				width: 400,// 必须指定一个像素宽度值或者百分比，否则浏览器窗口改变可能导致artDialog收缩
				content: data.notice.content,
				close:function(){
					setCookie('notice_'+data.notice.id,1,30);
				}
			});
		}
	});

    $('#frm-add').submit(function (e) {
	    var data = $(this).serializeArray();
        $('.J_ajax_submit_btn').attr('disabled',true);
        $.ajax({
            type: 'POST',
            url: $(this).attr('action'),
            data: data,
            success: function (res) {
                if (res.status==1) {
                    art.dialog({
                        lock: true,
                        background: '#000',
                        opacity: 0.6,
                        content: '操作成功，等待审核~',
                        icon: 'warning',
                        ok: function () {
                            window.location.reload();
                        },
                        cancel: true
                    });
                } else {
                    art.dialog({
                        time: 3,
                        content: res.info
                    });
                }
                $('.J_ajax_submit_btn').attr('disabled',false);
                console.log(res);
            },
            dataType: 'json'
        });

        return false;
    });
});

function license() {
    art.dialog({
        title: '申请授权',
        content: document.getElementById('license-tags'),
        id: 'artid001'
    });
}
</script>

<div id="license-tags">
    <form action="http://www.hkcms.cn/index.php?g=content&m=index&a=addlicense" method="post" id="frm-add">
        <table width="100%">
            <tbody>
                <tr>
                    <th>域名</th>
                    <td>
                        <input name="domain" type="text" class="input length_5 required" value="{:request()->domain()}">
                    </td>
                </tr>
                <tr>
                    <th>公司名称</th>
                    <td>
                        <input name="company" type="text" class="input length_5 required" value="">
                    </td>
                </tr>
                <tr>
                    <th>QQ</th>
                    <td>
                        <input name="qq" type="text" class="input length_5 required" value="">
                    </td>
                </tr>
                <tr>
                    <th>邮箱</th>
                    <td>
                        <input name="mail" type="text" class="input length_5 required" value="" placeholder="邮箱">
                    </td>
                </tr>
                <tr>
                    <th>联系电话</th>
                    <td>
                        <input name="phone" type="text" class="input length_5 required" value="" placeholder="手机/电话">
                    </td>
                </tr>
            </tbody>
        </table>
        <p><button class="btn btn_submit mr10 J_ajax_submit_btn" type="submit">提交</button></p>
    </form>
</div>
</body>
</html>